<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <f:metadata>
        <f:viewParam id="uuid" name="uuid" value="#{subjectThread.currentThreadUuid}" required="true">
        </f:viewParam>
    </f:metadata>
    <f:event type="preRenderView" listener="#{subjectThread.initThread()}" />
    
    <head>
        <title>HEI ITI Forum : <h:outputText value="#{subjectsList.currentThread.title}"/></title>
    </head>
    
    <body>
        <h:panelGroup layout="block" rendered="#{not empty subjectThread.currentSubject}">
            <h:outputLink value="#{subjectThread.basePath}/subjects-threads.xhtml?uuid=#{subjectThread.currentSubject.uuid}">
                 Retour à la catégorie
            </h:outputLink>
        </h:panelGroup>
        <h:panelGroup layout="block" rendered="#{not empty subjectThread.currentThread}">
            <h2><h:outputText value="#{subjectThread.currentThread.title}"/></h2>
            <div><h:outputText value="#{subjectThread.currentThread.myDate}"/></div>
            <h:dataTable value="#{subjectThread.currentThread.myReplies}" var="reply" rendered="#{not empty subjectThread.currentThread.myReplies}">
                <h:column>
                    <h:form>
                        <h:outputText value="#{reply.content}" />
                    </h:form>
                </h:column>
            </h:dataTable>
        </h:panelGroup>
        
        <h:form>
            
        </h:form>
    </body>
</html>
